package com.ad.pet.app.account.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.TextView;

import com.ad.pet.R;
import com.ad.pet.common.data.utils.glide.GlideUtil;
import com.ad.pet.models.remote.account.order.OrderType;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * Created by liuyixiang on 2019/11/9.
 */

public class ServiceCollectionAdapter extends BaseQuickAdapter<OrderType,BaseViewHolder> {
    public ServiceCollectionAdapter(@Nullable List<OrderType> data) {
        super(R.layout.item_service_collecion, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, OrderType item) {

        ImageView ivHead = helper.getView(R.id.iv_head);
        TextView tvTitle  = helper.getView(R.id.tvTitle);
        TextView tvPRICE = helper.getView(R.id.tv_price);
        GlideUtil.load(mContext,item.getPic_cover_small(),ivHead);
        tvTitle.setText(item.getGoods_name());
        tvPRICE.setText("￥"+item.getPrice());
    }
}
